define ['fizz', 'view/CrudView', 'knockback', 'knockout'],  (fizz, CrudView, kb, ko) ->
  class UserCrudView extends CrudView
    
    constructor: ->
      super()

    specificAction: (e) ->
      if @action is 'add' or @action is 'edit'
        require [ 'ioc!roleListView' ], (v) =>
          v.render {
            action : "multiselect",
            isModal : true,
            selectedObjectsAttr: @model.attributes.roles
          }
          @mediator.subscribeOnce 'multiselect', (selectedObjectsAttr, Model) =>
            @model.attributes.roles = selectedObjectsAttr
            @render()
